//
//  apiManger.m
//  jiaKaoZhuShou
//
//  Created by 金艺社 on 2018/5/2.
//  Copyright © 2018年 金艺社. All rights reserved.
//

#import "apiManger.h"
#define logInip

// 正式环境
/** API */
static NSString *const api_url_dis = @"https://api.bxxueche.com/";
/** login */
static NSString *const login_url_dis = @"https://reg.bxxueche.com/";

// 测试环境
/** API */
static NSString *const api_url_dis1 = @"http://api2.bxxueche.com/";
/** login */
static NSString *const login_url_dis1 = @"http://reg2.bxxueche.com/";


@implementation apiManger
static apiManger *_instance;
+ (instancetype)shareApiManger {
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        _instance = [[self alloc] init];
    });
    return _instance;
}
- (NSString *)lonIn {//登录
    return [NSString stringWithFormat:@"%@%@", login_url_dis, @"user/v1/login.do"];
}
- (NSString *)registersCode {//注册请求验证码
    NSString *const str = @"user/v1/sendPCode.do";
    return [NSString stringWithFormat:@"%@%@", login_url_dis, str];
}
- (NSString *)registered {//注册请求接口
    return [NSString stringWithFormat:@"%@%@", login_url_dis, @"user/v1/reg.do"];
}
- (NSString *)logOut {//退出
    NSString *const str = @"user/v1/logout.do";
    return [NSString stringWithFormat:@"%@%@", login_url_dis, str];
}
- (NSString *)GetVerificatioVode {//非注册获取验证码
    return [NSString stringWithFormat:@"%@%@", api_url_dis, @"rest/sendPCodeb"];
}
- (NSString *)modifyPassword {//修改登录密码
    NSString *const str = @"rest/userLoginPwdUpdate";
    return [NSString stringWithFormat:@"%@%@", api_url_dis, str];
}
- (NSString *)isSetPayPassword {//是否设置交易密码
    NSString *const str = @"rest/isPayPassWord";
    return [NSString stringWithFormat:@"%@%@", api_url_dis, str];
}
- (NSString *)setAndModifyTradPassword {//设置、修改交易密码
    NSString *const str = @"rest/userSafePwdUpdate";
    return [NSString stringWithFormat:@"%@%@", api_url_dis, str];
}
- (NSString *)resetAndForgetLogInPassword {//重置登录密码
    NSString *const str = @"rest/userLoginPasswordUpdate";
    return [NSString stringWithFormat:@"%@%@", api_url_dis, str];
}
- (NSString *)resetradPassword {//重置交易密码
    NSString *const str = @"rest/userSafePasswordUpdate";
    return [NSString stringWithFormat:@"%@%@", api_url_dis, str];
}
- (NSString *)driveFlag {//热门城市
    NSString *const str = @"rest/drivingFlg";
    return [NSString stringWithFormat:@"%@%@", api_url_dis, str];
}
- (NSString *)drivcList {//驾校列表
    NSString *const str = @"rest/drivingList";
    return [NSString stringWithFormat:@"%@%@", api_url_dis, str];
}
- (NSString *)driveDetial {//驾校列表详情
    NSString *const str = @"rest/drivingList/";
    return [NSString stringWithFormat:@"%@%@", api_url_dis, str];
}
- (NSString *)installment {//分期数据
    NSString *const str = @"rest/attend/";
    return [NSString stringWithFormat:@"%@%@", api_url_dis, str];
}
- (NSString *)isShiMingRenZheng {//是否实名认证
    NSString *const str = @"rest/rechargeTo";
    return [NSString stringWithFormat:@"%@%@", api_url_dis, str];
}
- (NSString *)creatOrder {//生成订单
    NSString *const str = @"rest/saveOrder/";
    return [NSString stringWithFormat:@"%@%@", api_url_dis, str];
}
- (NSString *)orderList {//订单列表
    NSString *const str = @"rest/orderList";
    return [NSString stringWithFormat:@"%@%@", api_url_dis, str];
}
- (NSString *)orderListDetial {//订单详情
    NSString *const str = @"rest/orderList/";
    return [NSString stringWithFormat:@"%@%@", api_url_dis, str];
}
- (NSString *)lenderDetial {//我的教练
    NSString *const str = @"rest/lenderByUser/";
    return [NSString stringWithFormat:@"%@%@", api_url_dis, str];
}
- (NSString *)userCenter {//用户中心
    NSString *const str = @"rest/userCenter";
    return [NSString stringWithFormat:@"%@%@", api_url_dis, str];
}
- (NSString *)commitEvaluation {//提交对教练的评价
    NSString *const str = @"rest/saveAppraise/";
    return [NSString stringWithFormat:@"%@%@", api_url_dis, str];
}
- (NSString *)myBill {//我的账单
    NSString *const str = @"rest/myBill";
    return [NSString stringWithFormat:@"%@%@", api_url_dis, str];
}
- (NSString *)mainHongBao {// 我的红包
    NSString *const str = @"rest/hbListLooked";
    return [NSString stringWithFormat:@"%@%@", api_url_dis, str];
}
- (NSString *)repaymentHistory {//还款记录
    NSString *const str = @"rest/userRepaymentDetaliList";
    return [NSString stringWithFormat:@"%@%@", api_url_dis, str];
}
- (NSString *)huanKuanDetial {//还款明细
    NSString *const str = @"rest/userRepaymentDetaliList/";
    return [NSString stringWithFormat:@"%@%@", api_url_dis, str];
}
- (NSString *)moneyDetial {//资金明细
    NSString *const str = @"rest/userAccountDetail";
    return [NSString stringWithFormat:@"%@%@", api_url_dis, str];
}
- (NSString *)myTuiGuang {//我的推广
    NSString *const str = @"rest/userAnalysList";
    return [NSString stringWithFormat:@"%@%@", api_url_dis, str];
}
- (NSString *)OthersTuiGuang {//别人的推广
    NSString *const str = @"rest/userAnalysList";
    return [NSString stringWithFormat:@"%@%@", api_url_dis, str];
}
- (NSString *)message {// 消息
    NSString *const str = @"rest/articleList/app_site_notice";
    return [NSString stringWithFormat:@"%@%@", api_url_dis, str];
}

- (NSString *)InitializeCertification {
    NSString *const str = @"rest/ZhiMaCustomer";
    return [NSString stringWithFormat:@"%@%@", api_url_dis, str];
}
- (NSString *)GetVerificatioUrl {// 芝麻认证 url 获取
    NSString *const str = @"rest/ZhiMaCustomerCertification";
    return [NSString stringWithFormat:@"%@%@", api_url_dis, str];
}
- (NSString *)uploadHead {// 上传头像
    NSString *const str = @"rest/upHeadImg";
    return [NSString stringWithFormat:@"%@%@", api_url_dis, str];
}
- (NSString *)RechargeList { //充值记录
    NSString *const str = @"rest/rechargeList";
    return [NSString stringWithFormat:@"%@%@", api_url_dis, str];
}
- (NSString *)withdrawalRecord {// 提现记录
    NSString *const str = @"rest/cashList";
    return [NSString stringWithFormat:@"%@%@", api_url_dis, str];
}
- (NSString *)isCertification {//是否认证
    NSString *const str = @"rest/rechargeTo";
    return [NSString stringWithFormat:@"%@%@", api_url_dis, str];
}
- (NSString *)WithdrawalRules {//提现规则说明
    NSString *const str = @"rest/cashTo";
    return [NSString stringWithFormat:@"%@%@", api_url_dis, str];
}
- (NSString *)WithdrawalRequest {//提现请求
    NSString *const str = @"rest/cashSave";
    return [NSString stringWithFormat:@"%@%@", api_url_dis, str];
}
- (NSString *)recharge {//支付宝充值
    NSString *const str = @"rest/userRecharge";
    return [NSString stringWithFormat:@"%@%@", api_url_dis, str];
}
- (NSString *)aliPayReimbursement {//通过支付宝还款
    NSString *const str = @"rest/balancePayByAliPay";
    return [NSString stringWithFormat:@"%@%@", api_url_dis, str];
}
- (NSString *)aliPayPayServiceCharge {// 通过支付宝支付 服务费||全额付款
    NSString *const str = @"rest/directPayByAliPay/";
    return [NSString stringWithFormat:@"%@%@", api_url_dis, str];
}
- (NSString *)zhiJieZhiFuViewData {// 直接支付页面数据获取
    NSString *const str = @"rest/toPatBuffer/";
    return [NSString stringWithFormat:@"%@%@", api_url_dis, str];
}
- (NSString *)balanceReturnMoney {// 余额还款分期
    NSString *const str = @"rest/balancePay";
    return [NSString stringWithFormat:@"%@%@", api_url_dis, str];
}
- (NSString *)zhiJieZhiFuPay {// 余额付款全额/服务费
    NSString *const str = @"rest/toPayByAcount/";
    return [NSString stringWithFormat:@"%@%@", api_url_dis, str];
}
- (NSString *)versionNum {// 版本更新
    NSString *const str = @"rest/version";
    return [NSString stringWithFormat:@"%@%@", api_url_dis, str];
}
@end
